package com.adou.d10.reflect;

public class TestClass1 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class c1 = Student.class;
        System.out.println(c1.getName());// 全类名
        System.out.println(c1.getSimpleName());

        //
        Class c2 = Class.forName("com.adou.d10.reflect.Student");
        System.out.println(c2.getName());// 全类名
        System.out.println(c2.getSimpleName());
        System.out.println(c1 == c2);

        Student stu = new Student();
        Class c3 = stu.getClass();
        System.out.println(c3.getName());// 全类名
        System.out.println(c3.getSimpleName());
        System.out.println(c1 == c3);


    }
}
